package eu.orangeflash.webapis.xmlrpc
{
	import flash.events.IEventDispatcher;
	/**
	 * Interface, instances of IClient lets you communicate to server
	 * 
	 * @author	Nirth
	 * 
	 * @url		http://blog.orangeflash.eu
	 */
	public interface IClient extends IEventDispatcher
	{
		/**
		 * Property[Read-Write], indicates service end point (i.e http://orangeflash.eu/xmlrpc.php).
		 * 
		 * @usage		<code>myClientImpl.serviceURL = "http://mysite.com/xmlrpc/";</code>
		 * 
		 * @param		String, service end point.
		 * 
		 * @return		String, service end point.
		 */
		function set serviceURL(value:String):void;
		function get serviceURL():String;
		
		/**
		 * Method, invokes method on server.
		 * 
		 * @usage		<code>myClientImpl.invoke("example.Method",1);</code>
		 * 
		 * @param	methodName	String, method name.
		 * @param	...args		Rest, method arguments.
		 * 
		 * @return				IMethodCall instance.
		 */
		function invoke(methodName:String,...args):IMethodCall;
		
		/**
		 * Property[Read-Only], stores last result from last invocation of Method.result event.
		 * 
		 * @return				IMethodResponse instance.
		 */
		function get lastResult():IMethodResponse;
	}
}